package com.bingo.mpa.pojo;

import java.util.Map;

import org.apache.commons.beanutils.BeanUtils;
import org.express.portal.persist.POJO;

public class Package extends POJO
{
	private static final long serialVersionUID = 1L;
	private int pid;
	private byte carrier;	
	private String name;		
	private String fee;
	private String type;
	private String voice;
	private String traffic;
	private String mcount;
	private String tcount;
	private String video;
	private String sms;
	private String ex_voice;
	private String scope;
	private String ex_video;
	private String ex_traffic;
	private String vas;
	private String other;
	private String content;
	private String content_detail;
	private int prestore;
	private String pre_content;
	private String pre_cont_detail;
	
	public Package()
	{
		super._this_table_name = "P_PACKAGE";
	}

	public int getPid()
	{
		return pid;
	}

	public void setPid(int pid)
	{
		this.pid = pid;
	}

	public byte getCarrier()
	{
		return carrier;
	}

	public void setCarrier(byte carrier)
	{
		this.carrier = carrier;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getFee()
	{
		return fee;
	}

	public void setFee(String fee)
	{
		this.fee = fee;
	}

	public String getType()
	{
		return type;
	}

	public void setType(String type)
	{
		this.type = type;
	}

	public String getVoice()
	{
		return voice;
	}

	public void setVoice(String voice)
	{
		this.voice = voice;
	}

	public String getTraffic()
	{
		return traffic;
	}

	public void setTraffic(String traffic)
	{
		this.traffic = traffic;
	}

	public String getMcount()
	{
		return mcount;
	}

	public void setMcount(String mcount)
	{
		this.mcount = mcount;
	}

	public String getTcount()
	{
		return tcount;
	}

	public void setTcount(String tcount)
	{
		this.tcount = tcount;
	}

	public String getVideo()
	{
		return video;
	}

	public void setVideo(String video)
	{
		this.video = video;
	}

	public String getSms()
	{
		return sms;
	}

	public void setSms(String sms)
	{
		this.sms = sms;
	}

	public String getEx_voice()
	{
		return ex_voice;
	}

	public void setEx_voice(String ex_voice)
	{
		this.ex_voice = ex_voice;
	}

	public String getScope()
	{
		return scope;
	}

	public void setScope(String scope)
	{
		this.scope = scope;
	}

	public String getEx_video()
	{
		return ex_video;
	}

	public void setEx_video(String ex_video)
	{
		this.ex_video = ex_video;
	}

	public String getEx_traffic()
	{
		return ex_traffic;
	}

	public void setEx_traffic(String ex_traffic)
	{
		this.ex_traffic = ex_traffic;
	}

	public String getVas()
	{
		return vas;
	}

	public void setVas(String vas)
	{
		this.vas = vas;
	}

	public String getOther()
	{
		return other;
	}

	public void setOther(String other)
	{
		this.other = other;
	}
	
	public String getContent()
	{
		return content;
	}

	public void setContent(String content)
	{
		this.content = content;
	}

	public String getContent_detail()
	{
		return content_detail;
	}

	public void setContent_detail(String content_detail)
	{
		this.content_detail = content_detail;
	}

	public int getPrestore()
	{
		return prestore;
	}

	public void setPrestore(int prestore)
	{
		this.prestore = prestore;
	}

	public String getPre_content()
	{
		return pre_content;
	}

	public void setPre_content(String pre_content)
	{
		this.pre_content = pre_content;
	}

	public String getPre_cont_detail()
	{
		return pre_cont_detail;
	}

	public void setPre_cont_detail(String pre_cont_detail)
	{
		this.pre_cont_detail = pre_cont_detail;
	}

	@SuppressWarnings("unchecked")
	protected Map<String, Object> listInsertableFields()
	{
		try
		{
			Map<String, Object> props = BeanUtils.describe(this);
			if (getId() <= 0)
			{
				if(props.containsKey("id"))
				{
					props.remove("id");
				}
				if(props.containsKey("pid"))
				{
					props.remove("pid");
				}
			}
			props.remove("class");
			return props;
		}
		catch (Exception e)
		{
			throw new RuntimeException("Exception when Fetching fields of " + this);
		}
	}
}
